package com.hzit.page.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
    * 商品表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_item")
public class TbItem implements Serializable {
    /**
     * 商品id，同时也是商品编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 商品卖点
     */
    @TableField(value = "sell_point")
    private String sellPoint;

    /**
     * 商品价格，单位为：元
     */
    @TableField(value = "price")
    private BigDecimal price;

    @TableField(value = "stock_count")
    private Integer stockCount;

    /**
     * 库存数量
     */
    @TableField(value = "num")
    private Integer num;

    /**
     * 商品条形码
     */
    @TableField(value = "barcode")
    private String barcode;

    /**
     * 商品图片
     */
    @TableField(value = "image")
    private String image;

    /**
     * 所属类目，叶子类目
     */
    @TableField(value = "categoryId")
    private Integer categoryid;

    /**
     * 商品状态，1-正常，2-下架，3-删除
     */
    @TableField(value = "status")
    private String status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(value = "item_sn")
    private String itemSn;

    @TableField(value = "cost_pirce")
    private BigDecimal costPirce;

    @TableField(value = "market_price")
    private BigDecimal marketPrice;

    @TableField(value = "is_default")
    private String isDefault;

    @TableField(value = "goods_id")
    private Long goodsId;

    @TableField(value = "seller_id")
    private String sellerId;

    @TableField(value = "cart_thumbnail")
    private String cartThumbnail;

    @TableField(value = "category")
    private String category;

    @TableField(value = "brand")
    private String brand;

    @TableField(value = "spec")
    private String spec;

    @TableField(value = "seller")
    private String seller;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_TITLE = "title";

    public static final String COL_SELL_POINT = "sell_point";

    public static final String COL_PRICE = "price";

    public static final String COL_STOCK_COUNT = "stock_count";

    public static final String COL_NUM = "num";

    public static final String COL_BARCODE = "barcode";

    public static final String COL_IMAGE = "image";

    public static final String COL_CATEGORYID = "categoryId";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_ITEM_SN = "item_sn";

    public static final String COL_COST_PIRCE = "cost_pirce";

    public static final String COL_MARKET_PRICE = "market_price";

    public static final String COL_IS_DEFAULT = "is_default";

    public static final String COL_GOODS_ID = "goods_id";

    public static final String COL_SELLER_ID = "seller_id";

    public static final String COL_CART_THUMBNAIL = "cart_thumbnail";

    public static final String COL_CATEGORY = "category";

    public static final String COL_BRAND = "brand";

    public static final String COL_SPEC = "spec";

    public static final String COL_SELLER = "seller";
}